#include "VideoController.h"
#include "Thread.h"

VideoController::VideoController(cv::VideoCapture &streamSource) : source(streamSource)
{
	if (!source.isOpened())
		std::cout << "cannot open camera.";
	else
	{
		this->displayStream = new DisplayStream(source);
		this->Start();
	}
}

void VideoController::Start()
{
	Thread<DisplayStream> thread(this->displayStream, &DisplayStream::Run);

	if (thread.start())
        std::cout << "Thread start() ::  DisplayStream Run" << std::endl;
	thread.join();
}

void VideoController::Stop()
{

}

void VideoController::Pause()
{
}

void VideoController::Back()
{
}

void VideoController::ReturnTodirect()
{
}
